package com.zy.imagineCommunity.dao;

import com.zy.imagineCommunity.entity.Message;
import com.zy.imagineCommunity.entity.MessageText;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MessageMapper {

    //增加信息
    public int addMessage(Message message);

    //根据fromToId倒叙查询消息
    public List<MessageText> queryMessageTextByFromToIdAndBeginAndPageSize(String fromToId, int begin, int pageSize);

    //根据fromToId查询消息数量
    public int queryMessageTotalCountByFromToId(String fromToId);

    /**
     * 根据私信id删除信息
     *
     * @param messageId
     */
    void deleteMessageByMessageId(int messageId);

}
